package com.umakr.demo.controller;

import com.umakr.demo.model.Kecheng;
import com.umakr.demo.service.StudentShowKechengService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by yangliu on 2017/8/23.
 */
@Controller
@RequestMapping("/StudentShowKecheng")
public class StudentShowKecheng {

    @Autowired
    StudentShowKechengService studentShowKechengService;

    @RequestMapping("/kechengInf")
    public String kechengInf(){
        return "StudentManage/studentshowkecheng";
    }

    @RequestMapping("/showKecheng")
    @ResponseBody
    public List<Kecheng> showKecheng(Long sid){
        List<Kecheng> list = studentShowKechengService.studentShowKecheng(sid);
        return list;
    }
}
